import api from "@/utils/service";

export const memberList = (data) => {
  return api({
    url: "/member/list",
    method: "get",
    params: { ...data },
  });
};

export const completeList = (data) => {
  return api({
    url: "/member/complete/list",
    method: "get",
    params: { ...data },
  });
};

export const completeReview = (id, status) => {
  return api({
    url: `/member/complete/review?id=${id}&status=${status}`,
    method: "post",
  });
};

export const review = (data) => {
  return api({
    url: `/qualify/review`,
    method: "post",
    data,
  });
};

export const getDetails = (data) => {
  return api({
    url: "/member/details",
    method: "get",
    params: { ...data },
  });
};

export const setMemberStatus = (memberId, status) => {
  return api({
    url: `/member/status?memberId=${memberId}&status=${status}`,
    method: "post",
  });
};

export const reviewDetails = (data) => {
  return api({
    url: "/qualify/review/details",
    method: "get",
    params: { ...data },
  });
};

export const customerList = (data) => {
  return api({
    url: "/customer/list",
    method: "get",
    params: { ...data },
  });
};
export const customerStatus = (data) => {
  return api({
    url: `/customer/status?id=${data.id}&status=${data.status}`,
    method: "post",
  });
};
export const customerEdit = (data) => {
  return api({
    url: `/customer/edit`,
    method: "post",
    data,
  });
};

export const adminList = (data) => {
  return api({
    url: "/member/adminList",
    method: "get",
    params: { ...data },
  });
};
export const adminStatus = (data) => {
  return api({
    url: `/member/adminStatus?id=${data.id}&status=${data.status}`,
    method: "post",
  });
};
export const adminEdit = (data) => {
  return api({
    url: `/member/adminUser/edit`,
    method: "post",
    data,
  });
};
export const adminPwd = (adminUid, password) => {
  return api({
    url: `/member/adminPwd?adminUid=${adminUid}&password=${password}`,
    method: "post",
  });
};
